<?php
// File: maintain-store-items.php
// Auth: Richard Foard (adapted from legacy calendar display page)
// Orig: 20Jan2014
//
require('../includes/class.main.php');
$manager = new MeetingManager();
include('../template/admin-header.php');
include('../includes/format-price.php');
?>

<div class="left">
<?php 
include('menu.php');
?>
</div>

<div class="right">
	<h2><span class="blue">To change or delete an item, locate it in the list below, then click the '<img src="../images/edit_icon_small.png"  alt="edit" />' to its left.</span></h2>

<?php
	$lookup = new StoreLookup();
	$pages = $lookup->getPages();
	
	while ($page = $pages->fetch_row()) {
		echo "<br /><b><span class=\"blue\">- $page[0]" . "</span></b><br />\n ";
		
		$details = $lookup->getDetails($page[0]);
		while ($item = $details->fetch_row()) {
			echo "<a href=\"edit-store-item.php?row=$item[0]\"><img src=\"../images/edit_icon_small.png\" alt=\"edit\" /></a>\n";
			echo "$item[3] (" . $item[2] . ") " . format_price($item[4]) . "<br />";
		}
	}
?>

</div>

<?php include('../template/admin-footer.php'); ?>
